Skip to content

Merge experimental OpenAPI support into master #1716

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 360 commits into from
Apr 21, 2025
Merged

Conversation

bkoelman
Copy link
Member

@bkoelman bkoelman commented Apr 21, 2025

OpenAPI support for JSON:API is now mostly feature-complete. This PR merges the OpenAPI work we started in 2021 into master.

Contributes to #1046.

QUALITY CHECKLIST

…r-type

OpenAPI: Fix "id" parameter in URL to be string
…esourceIdentifier -> Identifier, drop Object suffixes
… provider, remove ISchemaRepositoryAccessor, remove OAS caching (no measurable gain)
…by client tests; expand model used for query strings
…sk (makes it easier to keep in sync during development)
OpenAPI: Support including related resources
OpenAPI: Filter endpoints based on GenerateControllerEndpoints usage
Fix OpenAPI example crash in Visual Studio 2022 v17.9.0
bkoelman added 20 commits March 16, 2025 13:31
Add missing 422 status code in post/patch/delete relationship endpoint
Renames in OAS output:
- [ResourceName] Primary Response Document -> Primary [ResourceName] Response Document
- [ResourceName] Secondary Response Document -> Secondary [ResourceName] Response Document
- Nullable [ResourceName] Secondary Response Document -> Nullable Secondary [ResourceName] Response Document
- Data In Response -> Resource In Response
- [ResourceName] Data In Response -> Data In [ResourceName] Response
- [ResourceName] Attributes In Response -> Attributes In [ResourceName] Response
- [ResourceName] Relationships In Response -> Relationships In [ResourceName] Response
Add support for resource inheritance in OpenAPI
Improve code coverage by skipping unreachable code
* Remove left-overs from SDK workaround (#1699)

* Update http links to https

* Strip namespaces when unit tests log to the Output Window (#1706)
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 83.17669% with 179 lines in your changes missing coverage. Please review.

Project coverage is 90.78%. Comparing base (67386f3) to head (81ed9a2).
Report is 361 commits behind head on master.

Files with missing lines Patch % Lines
...nApiDotNetCore.OpenApi.Client.NSwag/ApiResponse.cs 73.07% 7 Missing ⚠️
...pi.Client.NSwag/BlockedJsonInheritanceConverter.cs 41.66% 7 Missing ⚠️
...piDotNetCore.OpenApi.Client.NSwag/JsonApiClient.cs 95.39% 2 Missing and 5 partials ⚠️
...uckle/JsonApiActionDescriptorCollectionProvider.cs 91.86% 2 Missing and 5 partials ⚠️
...Links/ResourceIdentifierCollectionTopLevelLinks.cs 0.00% 7 Missing ⚠️
...piObjects/Links/ResourceCollectionTopLevelLinks.cs 0.00% 6 Missing ⚠️
...ApiObjects/Documents/CollectionResponseDocument.cs 0.00% 5 Missing ⚠️
...cts/Documents/NullableSecondaryResponseDocument.cs 0.00% 5 Missing ⚠️
...sonApiObjects/Documents/PrimaryResponseDocument.cs 0.00% 5 Missing ⚠️
...nApiObjects/Documents/SecondaryResponseDocument.cs 0.00% 5 Missing ⚠️
... and 44 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1716      +/-   ##
==========================================
+ Coverage   90.64%   90.78%   +0.13%     
==========================================
  Files         355      467     +112     
  Lines       11569    14612    +3043     
  Branches     1909     2299     +390     
==========================================
+ Hits        10487    13265    +2778     
- Misses        706      917     +211     
- Partials      376      430      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bkoelman bkoelman force-pushed the merge-openapi-into-master branch from 38d4f63 to 81ed9a2 Compare April 21, 2025 11:00
@bkoelman bkoelman marked this pull request as ready for review April 21, 2025 12:12
@bkoelman bkoelman merged commit dd91468 into master Apr 21, 2025
16 checks passed
@bkoelman bkoelman deleted the merge-openapi-into-master branch April 21, 2025 12:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants